package com.framework.base.spi;

import java.util.ServiceLoader;

/**
 * @author chaolong.jin
 * @description
 * @date 2019/04/29 11:28
 */

public class StartCmand implements Cmand {
    @Override
    public void invoke() {
        System.out.println("Start Cmand");
    }

    public static void main(String[] args){
        ServiceLoader<Cmand> loader = ServiceLoader.load(Cmand.class);
        System.out.println(loader);

        for (Cmand Cmand : loader) {
            Cmand.invoke();
        }
    }
}
